package com.ibiaoke.goods.service;

import com.ibiaoke.common.base.Page;
import com.ibiaoke.goods.dao.CheckDao;
import com.ibiaoke.goods.entity.Check;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class CheckServiceImpl implements  CheckService{

    @Autowired
    private CheckDao checkDao;

    @Override
    public Integer addCheck(String userName, Integer shopId, Check check) {
        check.setOperator(userName);
        check.setShopId(shopId);
        check.setCreateTime(new Date());
        return checkDao.insert(check);
    }

    @Override
    public List<Check> findCheckList(String goodName, Integer goodId, Date checkStartTime, Date checkEndTime,Integer shopId, Page page) {
        return checkDao.findCheckList(goodName,goodId,checkStartTime,checkEndTime,shopId,page);
    }


}
